package com.example.business.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.business.dao.entity.Diary;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

public interface DiaryMapper extends BaseMapper<Diary> {
    // 自定义方法：根据日期查询日记
    Diary selectByRecordDate(@Param("recordDate") LocalDate recordDate);
    
    // 自定义方法：查询最近n天的日记
    List<Diary> selectRecentDiaries(@Param("days") int days);
}